public class EvenNumberTest {
    public static void main(String[] args) {
        EvenNumberPrint p1 = new EvenNumberPrint();
        p1.start();

        for(int i=1;i<=100;i++){
            if(i%2 == 0)
                System.out.println(Thread.currentThread().getName() + "  " + i+"**");
        }
        EvenNumberPrint p2 = new EvenNumberPrint();
        p2.start();
    }

    
}

class EvenNumberPrint extends Thread {
    @Override
    public synchronized void run() {
        // TODO Auto-generated method stub
        for(int i=1;i<=100;i++){
            if(i%2 == 0)
                System.out.println(Thread.currentThread().getName() + "  "+ i);
        }
    }

}
